import React from 'react';
import { Text, View } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import ArticleList from '../ArticleList';
function HomeScreen() {
  return (
    <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
      <ArticleList />
    </View>
  );
}

function FeatureScreen() {
  return (
    <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
      <Text>功能</Text>
    </View>
  );
}

function CommunityScreen() {
  return (
    <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
      <Text>社区</Text>
    </View>
  );
}

function MineScreen() {
  return (
    <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
      <Text>我的</Text>
    </View>
  );
}

const Tab = createBottomTabNavigator();

const HomeTab = () => {
  return (
    <NavigationContainer>
      <Tab.Navigator>
        <Tab.Screen name="首页" component={HomeScreen} />
        <Tab.Screen name="功能" component={FeatureScreen} />
        <Tab.Screen name="社区" component={CommunityScreen} />
        <Tab.Screen name="我的" component={MineScreen} />
      </Tab.Navigator>
    </NavigationContainer>
  );
};
export default HomeTab;
